package controllers.api;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.mongodb.BasicDBObject;
import com.sun.jndi.cosnaming.IiopUrl.Address;

import models.Group;
import models.User;
import play.modules.mongo.MongoCursor;
import play.data.validation.*;
public class Groups extends API {
	public static void create(){
		Group group=new Group();
		group.setName(request.params.get("name"));
		group.save();
		json(group);
	}
	public static void list(){
		List<Group> groups = Group.find().fetch();
		json(groups);
	}
}
